﻿using System;

namespace SsrsRenderStudio.Renderer.Output.Version2010
{
    public sealed class FormOutput : MetafileOutput
    {
        public FormOutput(byte[][] renderReport) : base(renderReport) { }
       
        public override void Process()
        {
            ShowInForms();
        }

        public void ShowInForms()
        {
            try
            {
                for (int i = 0; i < _metafiles.Length; i++)
                {
                    FormOutputForm form = new FormOutputForm(_metafiles[i]);
                    //TODO change this to show
                    // and set the initial size of form
                    form.ShowDialog();
                }
            }
            catch (Exception e)
            {
                Shared.Logger.WriteConsole("****FORM OUTPUT EXCEPTION: " + e.Message);
            }
        }
    }
}
